import pandas

FN_IN = "cmcc_predict.csv"
FN_OUT = "predict.df.csv"

df = pandas.read_csv(FN_IN)

labels = df["label_raw"].unique()

df["correct"]   = df["predict"]==df["label_raw"]
df["valid"]     = [ e in labels for e in df["predict"] ]
df["len"]       = [ len(e) for e in df["word_mf2"] ]

df.to_csv(FN_OUT)

print(df.columns)
